# -*- coding: utf-8 -*-
def fsoma(a, b):
    if isinstance(a, int) and isinstance(b, int):
        soma = a + b
    else:
        print "a ou b não são inteiros e a soma sera nula"
        soma = 0
    return soma
y1 = fsoma(1, 6)
print y1
y2 = fsoma(1, "b")
        
def fmult(l1):
    mult = 1
    for i in range(len(l1)):
        mult = mult * l1[i]
    return mult

l1 = [1, 3, 4, 5]
print fmult(l1)

def fOp(a, b, op = "sum"):
    if op == "sum":
        soma = a + b
    if "sub":
        soma = a - b
    if "mul":
        soma = a * b
    if "div":
        soma = a / b
        
    return soma

print fOp(4.0, 5.0)
print fOp(19.0, 5.0, "sub")
print fOp(4.0, 5.0, "mul")
print fOp(41.0, 5.0, "div")
